<template>
  <div class="error-container">
    <div class="error-content">
      <h1>404</h1>
      <h2>页面不存在</h2>
      <p>抱歉，您访问的页面不存在或已被删除</p>
      <el-button type="primary" @click="goHome">返回首页</el-button>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goHome = () => {
  router.push('/')
}
</script>

<style scoped>
.error-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f5f7fa;
}

.error-content {
  text-align: center;
}

h1 {
  font-size: 72px;
  margin-bottom: 20px;
  color: #f56c6c;
}

h2 {
  font-size: 24px;
  margin-bottom: 16px;
  color: #606266;
}

p {
  margin-bottom: 24px;
  color: #909399;
}
</style>